﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace YSGetLatest
{
	/// <summary>
	/// Methods getting an assembly info.
	/// </summary>
	public static class AssemblyUtils
	{
		/// <summary>
		/// Gets the assembly company.
		/// </summary>
		public static string AssemblyCompany
		{
			get
			{
				object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
				if (attributes.Length == 0)
				{
					return "";
				}
				return ((AssemblyCompanyAttribute)attributes[0]).Company;
			}
		}

		/// <summary>
		/// Gets the assembly name.
		/// </summary>
		public static string AssemblyName
		{
			get
			{
				var assemblyName = Assembly.GetExecutingAssembly().GetName().Name;
				return assemblyName;
			}
		}
	}
}
